<?php
header ('Content-type: text/html; charset=utf-8');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF8" />
<title><?php echo $params["title"] ?></title>
<link rel="stylesheet" type="text/css" href="<?php echo WWWROOT . "views/style/style.css"?>"></link>
<link rel="stylesheet" type="text/css" href="<?php echo WWWROOT . "views/style/jquery-ui.css"?>"></link>
<link rel="stylesheet" type="text/css" href="<?php echo WWWROOT . "views/style/jHtmlArea.ColorPickerMenu.css"?>"></link>
<link rel="stylesheet" type="text/css" href="<?php echo WWWROOT . "views/style/jHtmlArea.css"?>"></link>
<script type="text/javascript" src="<?php echo WWWROOT . "views/js/functions.js"?>"></script>
<script type="text/javascript" src="<?php echo WWWROOT . "views/js/jquery.js"?>"></script>
<script type="text/javascript" src="<?php echo WWWROOT . "views/js/jquery-form.js"?>"></script>
<script type="text/javascript" src="<?php echo WWWROOT . "views/js/jquery-ui.js"?>"></script>
<script type="text/javascript" src="<?php echo WWWROOT . "views/js/jquery.ui.datepicker.js"?>"></script>
<script type="text/javascript" src="<?php echo WWWROOT . "views/js/jquery.ui.widget.js"?>"></script>
<script type="text/javascript" src="<?php echo WWWROOT . "views/js/jquery.ui.datepicker-" . getLanguage() . ".js"; ?>"></script>
<script type="text/javascript" src="<?php echo WWWROOT . "views/js/jHtmlArea-0.7.0.min.js"?>"></script>
<script type="text/javascript" src="<?php echo WWWROOT . "views/js/jHtmlArea.ColorPickerMenu-0.7.0.min.js"?>"></script>
<!--[if IE 8]>
  <link rel="stylesheet" type="text/css" href="<?php echo WWWROOT; ?>views/style/ie8.css" />
<![endif]-->
<!--[if IE 7]>
  <link rel="stylesheet" type="text/css" href="<?php echo WWWROOT; ?>views/style/ie7.css" />
<![endif]-->
<script type="text/javascript">

var userAgent = navigator.userAgent.toLowerCase();
var chrome = /chrome/.test(navigator.userAgent.toLowerCase());
var mozilla = /firefox/.test(navigator.userAgent.toLowerCase());

if(chrome){
document.write('<link rel="stylesheet" type="text/css" href="<?php echo WWWROOT; ?>views/style/chrome.css" />');
}
if(mozilla){
document.write('<link rel="stylesheet" type="text/css" href="<?php echo WWWROOT; ?>views/style/ff.css" />');
}

$(document).ready(function() {
	$.datepicker.setDefaults( $.datepicker.regional["<?php echo getLanguage();?>"] );
	$.datepicker.formatDate('<?php echo langEcho("date:format:real");?>');

	$('#loading').ajaxStart(function() {
	    $(this).show();
	}).ajaxComplete(function() {
	    $(this).hide();
	});

	$("form").submit(function() {
		$('#loading').show();
		return true;
	});

	$("form:not([regularPost])").ajaxForm(function(responseText, statusText, xhr, form) {
         var response = eval("("+responseText+")");
         if(response.success){
			if(response.url != ""){
				location = response.url;
			}
			if(response.message != ""){
				displaySuccessMessage(response.message.replace("\n","<br/>"));
			}
         }else{
			if(response.message != ""){
				displayErrorMessage(response.message.replace("\n","<br/>"));
			}
			$('#loading').hide();
         }
    });

});

var currentLang = '<?php echo getLanguage();?>';
var wwwroot = '<?php echo WWWROOT?>';

</script>
</head>
<body>
<div id="loading" class="loading" style="display:none;">
	<img src='<?php echo WWWROOT?>images/loading.gif' alt='' />
</div>
<div id="header">
	<div class="left">
		<a href="<?php echo  WWWROOT?>">
			<img id="header-logo" src="<?php echo WWWROOT?>images/logo.png" alt="" />
		</a>
	</div>
	<div class="headerTitle">
		<a href="<?php echo  WWWROOT?>">
			<?php echo langEcho("title:benefits");?>
		</a>
	</div>
	<div class="right">

	</div>
</div>